package model.shapes;

import java.awt.Rectangle;
import java.awt.Shape;
import java.awt.geom.GeneralPath;

import com.mxgraph.canvas.mxGraphics2DCanvas;
import com.mxgraph.shape.mxBasicShape;
import com.mxgraph.view.mxCellState;

public class InheritanceShape extends mxBasicShape {

	/**
	 * 
	 */
	public Shape createShape(mxGraphics2DCanvas canvas, mxCellState state)
	{
		Rectangle temp = state.getRectangle();
		int x = temp.x;
		int y = temp.y;
		int w = temp.width;
		int h = temp.height;

		GeneralPath path = new GeneralPath();

		path.moveTo(x + (w/2), y);
		path.lineTo(x + w , y + h);
		path.lineTo(x, y + h);
		path.lineTo(x + (w/2), y);
		path.closePath();
		
		return path;
	}

}
